DX: One-command UI preview, auto-published manifest, and smoother Anvil/MetaMask flow#19
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Quickstart path built and deployed contracts, but it was unclear how to actually load the website.
Users ended up reaching for an ad-hoc static server (often Python), and even after
th deploythe UI could still showdeploymentEntrypointAddress = 0x0because the served manifest copy insideui-site/was not being updated.What changed
th previewcommand to serve the generated static UI locally (no Python required).<buildDir>/ui-sitewith trailing-slash handling (Next export) andCache-Control: no-storeso manifest updates show up immediately.th deployandth verifynow re-publish the updatedmanifest.jsoninto the served UI locations:ui-site/.well-known/tokenhost/manifest.jsonui-site/manifest.jsonth buildnow prints concrete next steps (deploy + preview).th initproject README now includesth preview.wallet_addEthereumChainthen retries.th previewand a short MetaMask chain note.How to test
pnpm installpnpm th build apps/example/job-board.schema.json --out artifacts/job-boardanvilpnpm th deploy artifacts/job-board --chain anvilpnpm th preview artifacts/job-boardand open http://127.0.0.1:3000/Notes
th previewis a tiny Node static server intended for local DX.